package com.usian.article.controller.v1;

import com.usian.apis.article.ApArticleConfigControllerApi;
import com.usian.article.service.ApArticleConfigService;
import com.usian.model.article.pojos.ApArticleConfig;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmNews;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.POST;

/**
 * ClassName: ApArticleConfigController
 * Author:   WGG
 * Date:    2022-11-2022/11/23-18:26
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/article/api/v1/articleConfig")
public class ApArticleConfigController implements ApArticleConfigControllerApi {

    @Autowired
    private ApArticleConfigService apArticleConfigService;

    @Override
    @PostMapping("/saveArticleConfig")
    public ResponseResult saveArticleConfig(@RequestBody ApArticleConfig apArticleConfig) {
        return apArticleConfigService.saveArticleConfig(apArticleConfig);
    }

    @Override
    @PostMapping("/updateDown")
    public ResponseResult updateDown(@RequestBody WmNews wmNews) {
        return apArticleConfigService.updateDown(wmNews);
    }



}
